﻿#region 信息
// Copyright©2014 Rex Rao all rights reserved.
// File name : Mojito\Mojito.Data\OrderConfiguration.cs
// Author : Sohobloo
// Create time : 2014/08/29 10:12
// Update time : 2014/08/29 10:12
#endregion
namespace Mojito.Data.Configuration
{
    internal sealed partial class OrderConfiguration
    {
        protected override void ConfigurateExtension()
        {
            Property(o => o.OrderNumber).IsRequired().IsConcurrencyToken().HasMaxLength(12);
            Property(o => o.ObfuscatedOrderNumber).IsRequired().IsConcurrencyToken().HasMaxLength(12);
            HasOptional(o => o.Table).WithMany().HasForeignKey(o => o.TableId);
        }
    }
}